package com.itheima.test.lambda;

public class Lambda02 {
    public static void main(String[] args) {
        useFly(new Flyable() {
            @Override
            public void fly(String s) {
                System.out.println("放风筝");
                System.out.println(s);
            }
        });
        System.out.println("----------");
        useFly(( s)->{
            System.out.println("飞得更高");
            System.out.println(s);
        });
    }
    public static void useFly(Flyable f){//Flyable f=String s;
        f.fly("飞");
    }
}
interface Flyable{
    void fly(String s);
}